Integrand size = 42, antiderivative size = 255 \[ \int \frac {(a+b \cos (c+d x))^3 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=\frac {2 \left (15 a^3 B+27 a b^2 B+27 a^2 b C+7 b^3 C\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{15 d}+\frac {2 \left (21 a^2 b B+5 b^3 B+7 a^3 C+15 a b^2 C\right ) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{21 d}+\frac {2 \left (21 a^2 b B+5 b^3 B+7 a^3 C+15 a b^2 C\right ) \sqrt {\cos (c+d x)} \sin (c+d x)}{21 d}+\frac {2 b \left (27 a b B+22 a^2 C+7 b^2 C\right ) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{45 d}+\frac {2 b^2 (9 b B+13 a C) \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{63 d}+\frac {2 b C \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))^2 \sin (c+d x)}{9 d} \]
[Out]
Time = 0.65 (sec) , antiderivative size = 255, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3108, 3069, 3112, 3102, 2827, 2719, 2715, 2720} \[ \int \frac {(a+b \cos (c+d x))^3 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=\frac {2 b \left (22 a^2 C+27 a b B+7 b^2 C\right ) \sin (c+d x) \cos ^{\frac {3}{2}}(c+d x)}{45 d}+\frac {2 \left (7 a^3 C+21 a^2 b B+15 a b^2 C+5 b^3 B\right ) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{21 d}+\frac {2 \left (15 a^3 B+27 a^2 b C+27 a b^2 B+7 b^3 C\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{15 d}+\frac {2 \left (7 a^3 C+21 a^2 b B+15 a b^2 C+5 b^3 B\right ) \sin (c+d x) \sqrt {\cos (c+d x)}}{21 d}+\frac {2 b^2 (13 a C+9 b B) \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x)}{63 d}+\frac {2 b C \sin (c+d x) \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))^2}{9 d} \]
[In]
[Out]
Rule 2715
Rule 2719
Rule 2720
Rule 2827
Rule 3069
Rule 3102
Rule 3108
Rule 3112
Rubi steps \begin{align*} \text {integral}& = \int \sqrt {\cos (c+d x)} (a+b \cos (c+d x))^3 (B+C \cos (c+d x)) \, dx \\ & = \frac {2 b C \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))^2 \sin (c+d x)}{9 d}+\frac {2}{9} \int \sqrt {\cos (c+d x)} (a+b \cos (c+d x)) \left (\frac {3}{2} a (3 a B+b C)+\frac {1}{2} \left (7 b^2 C+9 a (2 b B+a C)\right ) \cos (c+d x)+\frac {1}{2} b (9 b B+13 a C) \cos ^2(c+d x)\right ) \, dx \\ & = \frac {2 b^2 (9 b B+13 a C) \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{63 d}+\frac {2 b C \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))^2 \sin (c+d x)}{9 d}+\frac {4}{63} \int \sqrt {\cos (c+d x)} \left (\frac {21}{4} a^2 (3 a B+b C)+\frac {9}{4} \left (21 a^2 b B+5 b^3 B+7 a^3 C+15 a b^2 C\right ) \cos (c+d x)+\frac {7}{4} b \left (27 a b B+22 a^2 C+7 b^2 C\right ) \cos ^2(c+d x)\right ) \, dx \\ & = \frac {2 b \left (27 a b B+22 a^2 C+7 b^2 C\right ) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{45 d}+\frac {2 b^2 (9 b B+13 a C) \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{63 d}+\frac {2 b C \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))^2 \sin (c+d x)}{9 d}+\frac {8}{315} \int \sqrt {\cos (c+d x)} \left (\frac {21}{8} \left (15 a^3 B+27 a b^2 B+27 a^2 b C+7 b^3 C\right )+\frac {45}{8} \left (21 a^2 b B+5 b^3 B+7 a^3 C+15 a b^2 C\right ) \cos (c+d x)\right ) \, dx \\ & = \frac {2 b \left (27 a b B+22 a^2 C+7 b^2 C\right ) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{45 d}+\frac {2 b^2 (9 b B+13 a C) \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{63 d}+\frac {2 b C \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))^2 \sin (c+d x)}{9 d}+\frac {1}{7} \left (21 a^2 b B+5 b^3 B+7 a^3 C+15 a b^2 C\right ) \int \cos ^{\frac {3}{2}}(c+d x) \, dx+\frac {1}{15} \left (15 a^3 B+27 a b^2 B+27 a^2 b C+7 b^3 C\right ) \int \sqrt {\cos (c+d x)} \, dx \\ & = \frac {2 \left (15 a^3 B+27 a b^2 B+27 a^2 b C+7 b^3 C\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{15 d}+\frac {2 \left (21 a^2 b B+5 b^3 B+7 a^3 C+15 a b^2 C\right ) \sqrt {\cos (c+d x)} \sin (c+d x)}{21 d}+\frac {2 b \left (27 a b B+22 a^2 C+7 b^2 C\right ) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{45 d}+\frac {2 b^2 (9 b B+13 a C) \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{63 d}+\frac {2 b C \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))^2 \sin (c+d x)}{9 d}+\frac {1}{21} \left (21 a^2 b B+5 b^3 B+7 a^3 C+15 a b^2 C\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx \\ & = \frac {2 \left (15 a^3 B+27 a b^2 B+27 a^2 b C+7 b^3 C\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{15 d}+\frac {2 \left (21 a^2 b B+5 b^3 B+7 a^3 C+15 a b^2 C\right ) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{21 d}+\frac {2 \left (21 a^2 b B+5 b^3 B+7 a^3 C+15 a b^2 C\right ) \sqrt {\cos (c+d x)} \sin (c+d x)}{21 d}+\frac {2 b \left (27 a b B+22 a^2 C+7 b^2 C\right ) \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{45 d}+\frac {2 b^2 (9 b B+13 a C) \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{63 d}+\frac {2 b C \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))^2 \sin (c+d x)}{9 d} \\ \end{align*}
Time = 2.53 (sec) , antiderivative size = 197, normalized size of antiderivative = 0.77 \[ \int \frac {(a+b \cos (c+d x))^3 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=\frac {84 \left (15 a^3 B+27 a b^2 B+27 a^2 b C+7 b^3 C\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )+60 \left (21 a^2 b B+5 b^3 B+7 a^3 C+15 a b^2 C\right ) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )+\sqrt {\cos (c+d x)} \left (7 b \left (108 a b B+108 a^2 C+43 b^2 C\right ) \cos (c+d x)+5 \left (252 a^2 b B+78 b^3 B+84 a^3 C+234 a b^2 C+18 b^2 (b B+3 a C) \cos (2 (c+d x))+7 b^3 C \cos (3 (c+d x))\right )\right ) \sin (c+d x)}{630 d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(744\) vs. \(2(287)=574\).
Time = 6.57 (sec) , antiderivative size = 745, normalized size of antiderivative = 2.92
method | result | size |
default | \(\text {Expression too large to display}\) | \(745\) |
parts | \(\text {Expression too large to display}\) | \(971\) |
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.14 (sec) , antiderivative size = 321, normalized size of antiderivative = 1.26 \[ \int \frac {(a+b \cos (c+d x))^3 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=\frac {2 \, {\left (35 \, C b^{3} \cos \left (d x + c\right )^{3} + 105 \, C a^{3} + 315 \, B a^{2} b + 225 \, C a b^{2} + 75 \, B b^{3} + 45 \, {\left (3 \, C a b^{2} + B b^{3}\right )} \cos \left (d x + c\right )^{2} + 7 \, {\left (27 \, C a^{2} b + 27 \, B a b^{2} + 7 \, C b^{3}\right )} \cos \left (d x + c\right )\right )} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) - 15 \, \sqrt {2} {\left (7 i \, C a^{3} + 21 i \, B a^{2} b + 15 i \, C a b^{2} + 5 i \, B b^{3}\right )} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) - 15 \, \sqrt {2} {\left (-7 i \, C a^{3} - 21 i \, B a^{2} b - 15 i \, C a b^{2} - 5 i \, B b^{3}\right )} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) - 21 \, \sqrt {2} {\left (-15 i \, B a^{3} - 27 i \, C a^{2} b - 27 i \, B a b^{2} - 7 i \, C b^{3}\right )} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) - 21 \, \sqrt {2} {\left (15 i \, B a^{3} + 27 i \, C a^{2} b + 27 i \, B a b^{2} + 7 i \, C b^{3}\right )} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right )}{315 \, d} \]
[In]
[Out]
Timed out. \[ \int \frac {(a+b \cos (c+d x))^3 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \frac {(a+b \cos (c+d x))^3 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=\int { \frac {{\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} {\left (b \cos \left (d x + c\right ) + a\right )}^{3}}{\sqrt {\cos \left (d x + c\right )}} \,d x } \]
[In]
[Out]
\[ \int \frac {(a+b \cos (c+d x))^3 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=\int { \frac {{\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} {\left (b \cos \left (d x + c\right ) + a\right )}^{3}}{\sqrt {\cos \left (d x + c\right )}} \,d x } \]
[In]
[Out]
Time = 3.61 (sec) , antiderivative size = 328, normalized size of antiderivative = 1.29 \[ \int \frac {(a+b \cos (c+d x))^3 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=\frac {2\,\left (B\,a^3\,\mathrm {E}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )+B\,a^2\,b\,\mathrm {F}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )+B\,a^2\,b\,\sqrt {\cos \left (c+d\,x\right )}\,\sin \left (c+d\,x\right )\right )}{d}+\frac {C\,a^3\,\left (\frac {2\,\sqrt {\cos \left (c+d\,x\right )}\,\sin \left (c+d\,x\right )}{3}+\frac {2\,\mathrm {F}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{3}\right )}{d}-\frac {2\,B\,b^3\,{\cos \left (c+d\,x\right )}^{9/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {9}{4};\ \frac {13}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{9\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}}-\frac {2\,C\,b^3\,{\cos \left (c+d\,x\right )}^{11/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {11}{4};\ \frac {15}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{11\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}}-\frac {6\,B\,a\,b^2\,{\cos \left (c+d\,x\right )}^{7/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {7}{4};\ \frac {11}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{7\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}}-\frac {6\,C\,a^2\,b\,{\cos \left (c+d\,x\right )}^{7/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {7}{4};\ \frac {11}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{7\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}}-\frac {2\,C\,a\,b^2\,{\cos \left (c+d\,x\right )}^{9/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {9}{4};\ \frac {13}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{3\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}} \]
[In]
[Out]